import axios from "axios";

export const SAVE_USER = 'save_user'

export const fetchUser = () => dispath => {
  return axios.get('http://localhost:3001/users').then(response=> {
    response = {
      data: [{id: 1, name: '</script><script>alert(1)</script>'}]
    }
    dispath({
      type: SAVE_USER,
      payload: response
    })
  })
}

